#include <iostream>
using namespace std;


#include <iostream>
#include <string>

class HttpStatus {
public:
    // 枚举类定义
    enum class Code {
        OK,
        NotFound,
        InternalServerError
    };

    // 构造函数
    explicit HttpStatus(Code code) : code_(code) {}

    // 获取状态码数值
    int getStatusCode() const {
        switch (code_) {
            case Code::OK: return 200;
            case Code::NotFound: return 404;
            case Code::InternalServerError: return 500;
        }
        return -1; // 不应到达
    }

    // 获取状态描述
    std::string getDescription() const {
        switch (code_) {
            case Code::OK: return "OK";
            case Code::NotFound: return "Not Found";
            case Code::InternalServerError: return "Internal Server Error";
        }
        return "Unknown Status";
    }

    // 打印状态信息
    void print() const {
        std::cout << getStatusCode() << " " << getDescription() << std::endl;
    }

private:
    Code code_;
};


int main(){

     HttpStatus ok(HttpStatus::Code::OK);
    HttpStatus notFound(HttpStatus::Code::NotFound);
    HttpStatus serverError(HttpStatus::Code::InternalServerError);

    ok.print();           
    notFound.print();      
    serverError.print();   

    return 0;
}